AT commands are extensively used to control the modem of mobile phones and other mobile devices for various functions such as voice calls, data calls, SMS, SIM access, phone book maintenance, network services, supplementary services and modem configurations etc. Conventional modems today lack an efficient method to prevent unauthenticated users or applications for using AT commands and other types of modem control commands. Although the user interface (UI) of a mobile phone has a lock to prevent unauthenticated users, AT commands or other modem control commands can still be used when tethering is enabled. No conventional protection is provided to prevent AT commands or other modem control commands from being issued to the modem of a mobile phone connected to a computer system.